<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/2 0002
 * Time: 下午 1:49
 */

namespace App\Http\Middleware;
use Closure;
use Session;

class UserloginMiddleware
{
    public function handle($request, Closure $next)
    {
        if(empty(session('user'))){
            return redirect('/user/login');
        }
        return $next($request);
    }

}